from SubThread.WindowSizeChageEvenet import WindowSizeChageEvenet
from windows.SubWindows.CharaInfo import CharaInfo


class AutoGridChara(WindowSizeChageEvenet):
    """
    DESCIRPT:
        WindowSizeChageEvent的子类
    SCRIPT:
        当窗口大小变化的时候 对窗口的人物进行重新的布局
    """
    def __init__(self, wm):
        super().__init__(wm)
        self.SqTime = .000001

    def overValidate(self):
        return self.mw.state != "图鉴"

    def threadBody(self):
        CharaInfo(self.mw)

